By bus
The public buses to Borobudur from Yogyakarta are aimed mostly at Indonesian visitors, and only a few tourists venture aboard. If you are adventurous though, the Trans-Jogya service runs from central Yogyakarta to Jombor bus terminal in northern Yogyakarta, bus 2B/2A Rp 3,000, where you can change to another bus to get to Borobudur. It takes about 60-90 minutes, and should cost around Rp 10,000-15,000 one way, but bargain with the bus staff to get a good price.
Buses run regularly from Magelang to Borobudur via Muntilan and are widely advertised there. The journey time is about 1 hour.
To get from or to the Hindu temples at Prambanan, take a Yogyakarta bus and get down at Jombor Terminal 90 min, Rp 15,000 for visitors, Rp 7,000 for Indonesians. From Jombor take TransJogya route 2B to Prambanan 45-60 min, Rp 3,000. It will require 3 bus changes: 2B from Jombor to Terminal Condong, 3B from Terminal Condong to Maguwo Jl. Solo and 1A/B from Maguwo to Prambanan.
By plane
The nearest larger airports are Yogyakarta's Adisucipto International Airport IATA: JOG and Solo's Adisumarmo International Airport IATA: SOC. Both are well connected domestically, and also offer some international connections to Singapore and Kuala Lumpur. AirAsia for example flies from Singapore to Yogyakarta daily.
It is possible, if one rushes oneself a bit, to visit Borobudur on a day trip from Bali or Jakarta. You can also fly direct to Semarang from Singapore with Batavia Air (http://www.batavia-air.com/) 4 times per week, and make your way to Borobudur from there 90 min by road.
By car
Borobudur is about 40 minutes north of Yogyakarta by car. Most of the route is on a well-maintained for Indonesia four-lane in many places highway, and there are frequent bus services see above. A taxi from central Yogyakarta to Borobudur costs around Rp 200,000, and from Yogyakarta airport about Rp 225,000.